package org.blade.personal.manager.sys;

import java.util.List;
import java.util.Map;
import java.util.logging.Logger;

import org.blade.personal.mode.sys.SystemUser;
import org.blade.personal.utils.Pager;

/**
 * 用户管理者
 * @author ZGF
 *@version 0.1
 */
public interface UserManager {
	
	/**
	 * 
	 */
	public  static final Logger LOG = Logger.getLogger(UserManager.class.getName());

	/**
	 * save user
	 * @param u The instance of User
	 * @return The effected number;
	 */
	public void saveUser(SystemUser u);
	
	/**
	 * update user
	 * @param u
	 */
	public void updateUser(SystemUser  u);
	
	public int deleteUser(SystemUser u);
	
	public void pagination(Pager<SystemUser> page, SystemUser user);
	
	/**
	 * Get user information by name and password
	 * @param name 
	 * @param password
	 * @return
	 */
	public SystemUser getUserByNameAndPassword(String name, String password);
	
	/**
	 * Got the number of user by name 
	 * @param name The name of user
	 * @return The number of user
	 */
	public int getUserCountByName(String name);
	
	/**
	 * Got the user by id
	 * @param id
	 * @return User
	 */
	public SystemUser getById(Long id);
	
	/**
	 * Get all users
	 * @return List<User> 
	 */
	public List<SystemUser> getAllUsers();

}
